{include file='public/header'}
{include file='public/list'}   
 <!--state overview end-->            <div class="row">
                <div class="col-md-12">
                    <!--work progress start-->
                    <section class="panel">
                        <header class="panel-heading">
                        系统设置
                        </header>
                        <div class="panel-body">
	
           <form class="form-horizontal tasi-form" action="" method="post" id="form">
                                    <div class="form-group">
                                        <label class="col-sm-2 col-sm-2 control-label">自助授权公告</label>
                                        <div class="col-sm-10">
                                             <textarea class="form-control" name="prompt" clos="100" rows="3"/>{$selfhelp.prompt}</textarea>
                                             <span class="help-block">这里填写您的自助授权页面的公告！</span>
                                        </div>
                                    </div>
									
                                  <div class="form-group">
                                        <label class="col-sm-2 col-sm-2 control-label">购卡网址</label>
                                        <div class="col-sm-10">
                                            <input type="text" name="website" class="form-control" value='{$selfhelp.website}'>
											<span class="help-block">这里填写您的卡密发货平台！</span>
                                        </div>
                                    </div>
                                    
                                  <div class="form-group">
                                        <label class="col-sm-2 col-sm-2 control-label">联系客服</label>
                                        <div class="col-sm-10">
                                            <input type="text" name="qq" class="form-control" value='{$selfhelp.qq}'>
											<span class="help-block">这里填写您的客服QQ！</span>
                                        </div>
                                    </div>                              
			<div id="bottom" class="form-group">
			<label class="col-sm-2 col-sm-2 control-label"></label>
			  <a class="btn btn-info btn-lg" value="true" id="submit" onclick='self_edit()'/><i class="fa fa-refresh" id="spinner"></i> <span id="btnText">更新设置</span></a>
            </div>
                            </form>
                        </div>
                    </section>
                    <!--work progress end-->
                </div>

        </section>
    </section>
    <!--main content end-->
{include file='public/footer'}
<script type="text/javascript">
function self_edit(){
    $.ajax({
        type: 'post',
        url: '{:url("admin/config/selfhelp")}',
        data: $('#form').serialize(),
        success: function(data){
            if(data.code==1){
                layer.msg(data.msg, 
                {icon:1,time:1000},function(){
                     window.location.href = data.url;});
            }else{
                layer.msg(data.msg, 
                {icon:2,time:1000});   
            }
        }
    });
}     
</script>